Imports System.Data.Common


Partial Class Presentation_Control_ModifyExecutive
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Sql As String
        Dim Records As DbDataReader
        Dim Params(0) As GenParameter

        Page.Title = "Change Executive's Details"

        If Not Page.IsPostBack Then

            'Populate the Executives List
            dlExecutives.DataTextField = "ExecutiveName"
            dlExecutives.DataValueField = "ExecutiveID"

            Sql = "SELECT ExecutiveID, ExecutiveName FROM ExecutiveMaster" & _
                " WHERE Active = 1 ORDER BY ExecutiveName"


            Records = GenHelper.ExecuteReader(Sql, ConfigurationManager.ConnectionStrings.Item("MySqlConnString").ToString())
            dlExecutives.DataSource = Records
            dlExecutives.DataBind()
            Records.Close()

        End If

    End Sub

    Public ReadOnly Property GetUniqueID() As Integer
        Get
            Return dlExecutives.SelectedValue
        End Get
    End Property

End Class
